using Game;
using GameEntitySystem;

namespace SCIENEW {
    public class DrillerDevice : SixDirectionModelDevice, IEntityDevice<ComponentDriller> {
        public enum Mode {
            Drill,
            Dispose
        }
        public DrillerDevice() : base(
            "DrillerDevice",
            "Models/Dirller",
            "Dirller",
            true
        ) { }

        public override bool IsTransparent_(int value) => true;

        public override BlockPlacementData GetPlacementValue(SubsystemTerrain subsystemTerrain, ComponentMiner componentMiner, int value, TerrainRaycastResult raycastResult) {
            return new BlockPlacementData() { CellFace = raycastResult.CellFace, Value = DevicesBlockManager.GetDeviceValue(Id, raycastResult.CellFace.Face) };
        }

        public override int GetFaceTextureSlot(int face, int value) => 100;

        public string GetEntityName(int value) => "Driller";

        public Widget GetWidget(IInventory inventory, ComponentDriller component) => new DrillerWidget(inventory, component);

        public override DeviceBehavior[] GetBehaviors(Project project) => [new DrillerDeviceBehavior(project)];
    }
}